﻿using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;

using DiPlaner.StickyWindow;

namespace DiPlaner
{
    public partial class LogForm
    {
        public List<string> LogBoxCollection;
        private StickyWindow.Windows.StickyWindow _stickyWindow;
        public bool Visible;

        public LogForm() 
        {
            InitializeComponent();

            Loaded += LogForm_Loaded;

            LogBoxCollection = new List<string>();
            logList.DataContext = LogBoxCollection;
            var bind = new Binding();
            logList.SetBinding(ItemsControl.ItemsSourceProperty, bind);
            //var list = logList.ItemsSource as List<string>;
            //if (list != null) list.RemoveAt(0);
        }

        void LogForm_Loaded(object sender, System.Windows.RoutedEventArgs e) 
        {
            _stickyWindow = new StickyWindow.Windows.StickyWindow(this)
                                {
                                    StickToScreen = false,
                                    StickToOther = true,
                                    StickOnResize = true,
                                    StickOnMove = true
                                };
        }

        private void DragMouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) 
        {
            DragMove();
        }

        private void btn_FormClose_Click_1(object sender, System.Windows.RoutedEventArgs e)
        {
            Close();
        }
    }
}
